added type check
fixes edit select bug
Merge pull request #208 from sulu-cmf/hotfix/null-object

[HOTFIX] Added type check when serializing smartcontent and internal links