def get_check_result(result, numvals):
    """Check the result of a 'get' operation"""
    if not isinstance(result, dict):
        return "pwrcmd output is not a dict"
    # Some errors return only the error itself
    if (result['PWR_ReturnCode'] != 0 and
            "attr_vals" not in result and
            "timestamps" not in result):
        return None
    # attr_vals must exist as a list with numvals elements
    if "attr_vals" not in result:
        return "'attr_vals' not found"
    if not isinstance(result['attr_vals'], list):
        return "'attr_vals' is not a list"
    if len(result['attr_vals']) != numvals:
        return "expected {} attr_vals".format(numvals)
    # timestamps must exist as a list with numvals elements
    if "timestamps" not in result:
        return "'timestamps' not found"
    if not isinstance(result['timestamps'], list):
        return "'timestamps' is not a list"
    if len(result['timestamps']) != numvals:
        return "expected {} timestamps".format(numvals)
    # status must exist
    if "status" not in result:
        return "'status' not found"
    return None