DB Syntax Error: CiviMail
The DB error looks to be caused by this clause: (civicrm_email.location_type_id != )  

I don't know why that is occurring but check anything related to location types.  Are you using flexmailer/Mosaico?  Do you have any extensions installed that relate to mailing or email address locations?