type checking in setting setters (issue #43)