Catching null pointer in queries with wrong field

Missing space between ){