New conditional to check memory parameter

- In case of user does not send memory has dict we are going to set it
  for him.