whitespace trimmed for is_ip() and fixed return bug