[qtdeclarative] Fix assert when assigning a null model pointer to a view...

....

If a QVariant is typed as a QObject or derived type but contains a null
pointer QQmlAdaptorModel will incorrectly assert as it expects a list or
invalid type if a non-null QObject pointer can't be derived from the
variant.  Move the assert statement to the conditional so null models
are correctly handled.