renamed NullType to UndefinedType in order to avoid confusion