This is correct but I found it a little confusing.
(col.getDefaulttype() == null) is the more reliable way of testing "has no default value".
(col.getDefaultvalue() == null) generally means EITHER "has no default value" OR "has a default value of NULL", depending on whether (col.getDefaulttype() == null).
Maybe the context saves you here, if we assume that a NON-NULLABLE column won't be allowed to be DEFAULT NULL, leaving only the "has no default value" interpretation, but default (col.getDefaulttype() == null) is a little more definitive.