You could ask them questions about how they feel about the LGBT+ community, like "How would you react if your friend was nonbinary?". Or you could start talking about an openly LGBT+ celebrity in a conversation, and see how they react. If their reactions are negative, it's probably better to stay closeted, but if they seem to be okay with the LGBT+ community, you can come out safely.