- adding rase excpetion for NoneType