[Utils] Move validIPAddress() and related method to Utils so that other classes can use them.