remove redundant null check