Improvement to permit types String, Long or Integer for DocumentId fields