BUG: add missing timedelta import
CLN/DOC: add more docs and validate the expression
CLN/DOC: add doc and remove unnecessary type checking