use a stricter check for a dictionary to prevent false positives on model objects with an items attribute