check if this object's CATEGORY matches the provided category.
a string representing a category of VexFlow objects.
defaults to true, so we walk up the prototype chain to look for a matching CATEGORY.
If false, we do not check the superclass or other ancestors.
true if obj has a static CATEGORY property that matches category.
Use instead of
instanceofas a more flexible type guard.