Added simple helper function for getting int value of a hash