ES6 classes: Invalid test for constructor property