remove unnecessary null check