Fix #166 by never passing null to `generateIsOfType`

and also remove the last few refs to "empty"