Avoid null pointer exceptions.
Avoid null pointer exceptions.
Populate the trade's parent position identifier when querying the database.