instanceof validation added