Fixes #705

This fixes the crash reported in #705. Adds a null check in both the constructor and the canBeWrapped method. Nothing fancy.