Throw a TypeError exception for invalid targets