def getKeyValue(kwarg, key):
    """Return key value from dictionary if present
    
    Parameters
    ----------
    kwarg : dict                      
      Dict object to find key from
    key : str 
      Key to retrieve value from
      
    Returns
    -------
    str or int or None
      Keyword value, None if key is invalid
    """
    if key in kwarg:
        return kwarg.get(key)
    else:
        return None