Fixed all the exceptions which should be raised in __init__()

We changed so that the exceptions are raised on the right conditions and we also added a couple of exceptions which are to be raised.