removed unnecessary null check