Removing unnecessary if syntax