Check if document is ready