Javascript: detect abstract classes, overrides