public static bool hasDoc(Doc document)
Checks if the document is valid
The instance of Doc to check
If the specified document handle is valid, it returns true. Otherwise, it returns false and error-handler is called.