Add exception to handle "NoneType"