moved assertion into case
moved assertion into case

the assertion should only be made if the property to be set
is the model, and the model can also be null

bb-generation/infinote,tyll/libinfinity,tyll/libinfinity,gobby/libinfinity,tyll/libinfinity,bb-generation/infinote,gobby/libinfinity,gobby/libinfinity