cleanup try/catch for if null