Big workaround for MySQL's bug with NULL value for prep statmt. Fix for postgresql as well but not a workaround