As you mentioned:
...some of the rows have format...
I suspect anything that doesn't contain comma returns empty values.
That is due to the split_part condition does not find a match for the argument.
To illustrate how different address values are split here's some example:
WITH    "table" ( address ) AS (
            VALUES
                ( 'BUILD NAME, 40' ),   -- first and second have value
                ( 'BUILD NAME' ),       -- only first have value (bldgname)
                ( '40' ),               -- only first have value (bldgname)
                ( ', 40' ),             -- first is empty string, second is value
                ( 'BUILD NAME,' ),      -- first is value, second is empty string
                ( NULL ),               -- both are NULL
                ( '' )                  -- no match found, both are empty strings
        )
SELECT  split_part( address, ', ', 1 ) as address_bldgname,
        split_part( address, ', ', 2 ) as address_bldgno
FROM    "table";
-- This is how it looks in result:
 address_bldgname | address_bldgno
------------------+----------------
 BUILD NAME       | 40
 BUILD NAME       |
 40               |
                  | 40
 BUILD NAME,      |
                  |
                  |
(7 rows)
If you want to set some defaults for NULL and empty string I recommend to read also: this answer