Updates BUILD logic to check explicitly for nil or empty string