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

Fixes additionaly https://github.com/sulu-cmf/sulu-standard/issues/182