return default value when hash isn empty