Holding paddle with both hands, one by the handle (bottom) and one holding it at the top

Yes, you can hold it with both hands which is usually at the handle. The question is , if one hand is on the handle (bottom of the paddle),and the other hand is on the opposite end (top of the paddle) and you hit the ball without touching either hand is this legal? Same question, but it touches the top hand. I have someone that plays like this on certain shots where he is using the top to kind of doing a flick. If he release before contact it is not issue, but if he is slow and both hands is still on the paddle during ball contact and hits part of the top hand, is this a legal hit?