I will move the int casts into the SQL and remove the first part of the conditional.