handle case where fileObject is null