I would brace the outer `if`, for readability -- but that's just a style nit.