Add an assert that class is not nullptr

Summary: Eletuchy asked for it on other diff but I missed it.

Reviewed By: @elgenie

Differential Revision: D1410525