Remove unnecessary check against function