remove unnecessary check for null