I would avoid to declare variable in a if personally.