Error null. How to ensure you can check if an error has been generated