Try to clean up possible null point exceptions.