I have an odd issue with get_term_by(). It's working fine when I use it inside a template, but when I use it in functions.php it just returns false.
$term = get_term_by('slug', 'some-term', 'some-taxonomy');
var_dump($term);
Any explanation as to why this is happening would be greatly appreciated.