Ensured that empty data doesn't raise exception.

If a Category object is created with an invalid ID, an empty array is
given to handleData.
This added statement prevents an exception.
Fixed if statement.

* Removed obsolete `> 0`
Fixed importing of contents.

* Contents can now be imported without prior import of categories
Merge pull request #242 from frmwrk123/fix/241

Fixed #241