The outcome of review on my 'Suggested Edit' to the 'Update' on initial question was 'It should have been written as a comment or an answer', so I'm posting it here:
The another way proposed will not only verify branches but any reference with such name @jhuynh.
git rev-parse --verify <reference-name>
# $? == 0 means reference with <reference-name> exists.
Issue with an 'Update' on initial quiestion explained:
Lets assume and check that 'master.000' is only a tag, such local branch does not exist, grep returns one entry wchich is a tag. Still rev-parse will return 0 if reference exists, even if such local branch does not exist. This is a false match, exactly as mentioned by @paul-s
$ git show-ref |grep master.000
f0686b8c16401be87e72f9466083d29295b86f4a refs/tags/master.000
$ git rev-parse --verify master.000
f0686b8c16401be87e72f9466083d29295b86f4a
$ echo $?
0