Crushing on my boss

So my boss is 9 years older than me, but we're pretty good friends. He's one of the only people that understands me. He's funny, smart, and hot as hell. But is it a bad idea to try and flirt with him? And would it be weird to text him outside of work?