raise type error instead of returning None