test constructors catch invalid