def _check_key_type(key_str, key_type=None):
 value = __salt__['pillar.get'](key_str, None)
 if (value is None):
  return None
 elif ((type(value) is not key_type) and (key_type is not None)):
  return False
 else:
  return True

def _check_key_type ( key_str , key_type = None ) : value = __salt__ [ 'pillar.get' ] ( key_str , None ) if ( value is None ) : return None elif ( ( type ( value ) is not key_type ) and ( key_type is not None ) ) : return False else : return True
helper function to get pillar[key_str] and check if its type is key_type returns none if the pillar key is missing .