Handle TypeError