simplified typeof test