Type and null checks