There are several costs to card marking - additional space for the card map, additional work to be done on each pointer store, and additional work to be done at garbage collection time.
In this example, if the Map on line 1 does not contain the person named "Bob," a null pointer exception will result on line 5 when the person is asked for his name.