def get_value_safe(d=None, key=None):
    """ Return value of a given dictionary for a key.
        @return: value for a key, None otherwise
    """

    if d is None or key is None:
        return None

    if key not in d:
        return None

    return d[key]