It is only ok to do, if you are ok with teaching them that your hands are their play toys.
When they get older, this habit will continue and you will always have them scratching and biting at your hands. When you want to pet them, they will see that as a sign to start playing, and will always scratch/bit you. You will also not be correct in getting mad at them, because you taught them that hands are toys. Your guests will also get hurt when trying to pet them. If your ok with the above, it is ok. If your not ok with the above, then make sure you have a toy in your hand for them to play with.