Added nice precondition violated message. Fixed error in check method.