remove unnecessary null check (before instanceof)