Fixed unexpected call to "map" function on content

Added type check before call to map function..