Question about get_position()

If there is no position, get_position() returns an error.
Is this the intended result ?
p=api.get_position(‘TSLA’)
p.qty

5
p=api.get_position(‘AAPL’)
p.qty

APIError: position does not exist