Added simple check for input variables.