removed excess null check