Enabling users to replace site title (text) with a image logo (but keeping the text if there isn’t any image)?

I figured out how:

<?php

    // Theme Options
    require_once(TEMPLATEPATH . '/functions/admin-menu.php');

    add_action( 'wp_head', 'theme_options');

    function theme_options() {
        // Initiate Theme Options
        $options = get_option('plugin_options');

        // If logo image was uploaded then remove text from site title
        if ($options['logo'] != NULL)
          $remove_text="-9999px";
        else
          $remove_text = 0;

        ?><style>
        body {
            background-color: <?php echo $options['color_scheme']; ?>
        }

        #header h1 a {
            background: url(<?php echo $options['logo']; ?>) no-repeat scroll 0 0;
            text-indent: <?php echo $remove_text; ?>;
        }
        </style><?php

    }

(The code works but please let me know if there’s a cleaner or easier way of doing this)