Added a uid validity check to Cred checker , removed uncessary import of defer in core, strip blanks and trailing spaces (PEP-8)