The code snippet in question is:
$check = apply_filters( "update_{$meta_type}_metadata",
null, $object_id, $meta_key, $meta_value, $prev_value );
if ( null !== $check )
return (bool) $check;
This filter only allows you to prevent the updating of the metadata for a given type, not to explicitly change the metadata itself.
If you want to use this filter to modify the metadata, you could try for example:
add_filter( 'update_post_metadata', 'wpse_163859', 10, 5 );
update_post_meta( $post_id = 123, 'test', 'ABCDEF' );
where:
function wpse_163859( $check, $object_id, $meta_key, $meta_value, $prev_value )
{
// Avoid infinite recursion:
remove_filter( current_filter(), __FUNCTION__ );
// Modify the meta value;
$meta_value = strtolower( $meta_value );
// Do something else ...
// Update the modified value.
update_post_meta( $object_id, $meta_key, $meta_value, $prev_value );
// Return something else than null
return true;
}