Catch null pointer when closing resources