I know this is not your work, but I think this can be put above the if statement better since it applies to the scope of the method, not only the scope of the if-statement.