Removes unnecessary check of a variable