added constructor check