[njs] Move check for loading dictionary in api