Testing the values of Views fields
Views provide to the template the html output of the field and not the actual value or a means to detect if it is empty or not. You will thus need to compare the field->content value with the expected html output. Assuming that you use Drupal 7 and you haven't overriden the field output or you haven't set the field as hidden ("exclude from display" option), the default field output is:

opendiv class="field-content"> ... html output here ... closediv>

Steps to achieve what you're trying to:

1) Add a function like the following: (replace "opendiv" and "closediv" with html open and close div tags, I couldn't get the editor not to filter them)


function mymodule_views_field_compare_value($field, $expected_value) {
      if ($field->content == 'opendiv class="field-content">'.$extected_value.'closediv>') {
          return true;
      }
      return false;
  }


2) To check if a field is not empty do:


if (!mymodule_views_field_compare_value($fields['field_ba_before'], '')) {
}


3) To check the value of the image positioning:


if (mymodule_views_field_compare_value($fields['field_image_position'], 'image_position_default')) {
}


This should help. You can use dpm($fields['field_image_position']) (if you're using the devel module) or var_dump($fields['field_image_position']) to check the actual output of the field, in case it is different than just 'image_position_default', I don't know what type of field it is.