Add helper method for variable name and value check