how would you do this with a single NULL check? (also, note that I don't show it here, but if the library name is not specified in the ccall, then I drop all of the code for loading the library and just look at the f_name symbol)