remove unnecessary check for nil