What is wrong with this code?

You are using get_post_type as variable instead of a function try:

function themeperauthor_need_switch() {
    global $post;
  if ( get_post_type($post) == 'weblogs' )  {
    return get_the_author_meta('themeperauthor', $user->ID);
  }
  return "";
}

error code: 523