2391 biosample empty attachment causes rendering error.

Documents, characterizations, and images now check not only whether an attachment exists or not, but also whether it has content or not.