Javascript If Variable Is Not Null Mysql