Fix ATTR_NOT_SPECIFIED comparison errors

Fixes bug #1099663

Replaced equality operators used with ATTR_NOT_SPECIFIED to 'is' or 'is not'.
Used is_attr_set() where comparsion is done to None and ATTR_NOT_SPECIFIED.

Change-Id: I67c87051b46ca0518fa777cbb1c3e6141a533b61
Merge "Fix ATTR_NOT_SPECIFIED comparison errors"