Fix notice for empty error messages

Fix notice for empty error messages