Ensure $component has been passed before checking is_current_component()

Passing an empty value was causing a PHP warning to be thrown when using
strstr() later in the function.

Fixes #5158

Props megainfo

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7361 cdf35c40-ae34-48e0-9cc9-0c9da1808c22