added types and undefined and null