check if an exception is not null