$reason is undefined in this context, creating it first means that the Inspector will not complain.