You could always use a case statement instead of an if.
One reason what you have may cause a problem is if you had more options... where an earlier selection would conflict with one that follows. The case statement doesn't have that problem:
Code:
# enable 256 colors support
case $TERM in
xterm) export TERM=xterm-256color
;;
screen) export TERM=screen-256color
;;
esac
The advantage is that only one option would be selected, and only one test. You could do the same
using an if, but it would be structured as "if... elif ... fi"