Update widget.js

Fixing bug in case trying to create a QR with content null