Fix typeof check for #188