fixes #14: add isValidExpression interface