NPE fix when null content is provided