Do not capitalize error description
Check if error code is None before comparing