Add api to check if the doc has animations or not

When getting the duration of a doc without elements
just return false