Better assertion syntax.
Fixed inverted condition; better null checking.