def check_param_type(p, t, ignore_none=False, param_name=''):
    """Checks if the informed param is the correct type."""
    if ignore_none and p is None:
        return
    if not isinstance(p, t):
        raise ValueError("Param. '{}' must be a '{}'".format(param_name, t))
