Adding simple IP address validation

Done for AGPUSH-1081

@abstractj thanks for the input on the JIRA, I have applied your suggestion