Q:

firestore database validation on type

Anyone know how to validate base on instanceof?
This seems like a no brainer check but I cannot find reference for this type of validation in the docs and my attempts have not been correct.
I want to fail if the value is not a Date. It might be a Timestamp in the current version of firestore. 
Failed attempts
allow write: if request.resource.data.date instanceof Date;
allow write: if request.resource.data.date instanceof Timestamp;
allow write: if !!Timestamp(request.resource.data.date);
allow write: if !!rules.Timestamp(request.resource.data.date);
allow write: if !!rules.Timestamp.date(request.data.date);
allow write: if !!Timestamp.date(request.data.date);
allow write: if !!Timestamp(request.data.date);

A:

I was clued into the solution through firebase support. The key comparator is the is keyword.
allow write: if request.resource.data.date is timestamp;

