Added handler to check whether to validate the current SQL or not. refs #454