Issue #452 Added method for checking the validity of a variable