Have not tested this but the first thing I'd do just for good measure is make sure this is wrapped in is_user_logged_in()
if(is_user_logged_in()) {
//then put your check/update code here
}
Inside of that, you could try...
global $current_user;
$useridvip=$current_user->ID;
$credits = get_user_meta($useridvip, 'credits', true);
if($credits == '') {
add_user_meta( $useridvip, 'credits', 0, true );
}
Generally speaking, you should try to rely upon get_user_meta and add_user_meta when possible.