dont crash on importing blank html

Fixes #1894 please test :)