Fix #187

Added NotNullAttribute.
Added support for extended error codes.
Merge pull request #1 from ColonelDuddits/Adding-NotNullAttribute

Fix #187