WordPress has two helpful functions for getting categories/taxonomies, get_terms and get_categories. The latter uses get_terms inside the function so you can think of these two functions as basically being the same. With the main difference being that get_terms accepts two parameters with the first being the taxonomy name and the second being an array of arguments. While get_categories just accepts an array of arguments.
The default return value for these functions is to return only categories that are linked to a post, but what if you want to get all terms even if they have not been attached to a post just yet?
You can use hide_empty for just this situation, and it will look like this depending on which function you want to use.
$terms = get_categories(array('hide_empty' => false));
or if you prefer get_terms
$terms = get_terms( 'my_term', array('hide_empty' => false));
Be sure to check out the codex for more information on these two useful functions, but if you are simply trying to get all terms even if they are not assigned to a post this is your answer. Ask any questions or let me know if this was helpful in the comments below.


