isVarSet :: Text -> State EvalState Bool
isVarSet s
    | isTitleShortVar s = do r <- getVar False isValueSet s
                             if r
                               then return r
                               else fmap (not . T.null) (getTitleShort s)
    | otherwise = if s /= "locator"
                  then getVar False isValueSet s
                  else getLocVar >>= return . (/=) "" . snd
isVarSet :: Text -> State EvalState Bool
isVarSet s
    | isTitleShortVar s = do r <- getVar False isValueSet s
                             if r
                               then return r
                               else fmap (not . T.null) (getTitleShort s)
    | otherwise = if s /= "locator"
                  then getVar False isValueSet s
                  else getLocVar >>= return . (/=) "" . snd
isVarSet s
    | isTitleShortVar s = do r <- getVar False isValueSet s
                             if r
                               then return r
                               else fmap (not . T.null) (getTitleShort s)
    | otherwise = if s /= "locator"
                  then getVar False isValueSet s
                  else getLocVar >>= return . (/=) "" . snd