Add type checks