added setNML function, which tests type