Repackage ErrorCodes enum
Remove redundant null checks