This is handy, but how does it deal with the case when class is None/null?