Write a function true_names() that takes a logical vector and returns the names of the elements with the value TRUE in case there are names. Otherwise return NULL. Be sure to include the necessary checks and messages for the user.