Force string type prior to empty? check to prevent errors if host ip value is nil. Add coverage for proper handling of nil value.