new method created that gets the value from the given map and if it does
not exist or is empty the given default value will be returned.