Check for the new exception within database query