public static function isValid($expression, $translate = false)
    {
        if ($translate) {
            $expression = self::translate($expression);
        }

        return is_bool($expression);
    }
public static function isValid($expression, $translate = false)
    {
        if ($translate) {
            $expression = self::translate($expression);
        }

        return is_bool($expression);
    }
public static function isValid ( $ expression , $ translate = false ) { if ( $ translate ) { $ expression = self :: translate ( $ expression ) ; } return is_bool ( $ expression ) ; }
Check if expression is valid

@param mixed $expression The expression to check
@param bool $translate

@return bool
Check if expression is valid