Javascript If Variable Is Not Null Mysql Community