Throws an error when constructing without new keyword.