Only return the library ending if the library is not null and it actually contains an ending.