check_dict_or_none

check_dict_or_none(_input)[source]

Validate that the input is either a dict or None.

Parameters:

_input (dict | ndarray | None) – Object to validate

Returns:

the input if it was a dict or None

Raises:

ValueError – if _input is neither dict nor None

Return type:

dict | None